<template>
    <fieldset>
        <legend>child2</legend>
        <h1>兄弟组件</h1>
        <button @click="send">送给你child</button>
    </fieldset>
</template>
<script>
export default {
    methods:{
        send() {
            this.$bus.$emit("bro",this.gift)
        }
    },
    data() {
        return {
            gift:"工作"
        }
    }
}
</script>
<style scoped>
    h1 {
        color: hotpink;
    }
</style>